<%@ page language="java" contentType="text/xml; charset=UTF-8" pageEncoding="UTF-8"  trimDirectiveWhitespaces="true" session="false" %>
<%@include file="../include/taglibs.jsp"%>
<%@include file="../include/urls.jsp"%>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<c:set var="gameUrl" value="${gamesUrl}{game.id}/" />

<game	id="${game.id}" 
		title="${game.title}"
		size="${game.size}"
		description="${game.description}"
		creationTime="${game.creationTime}"
		href="${gameUrl}">
		<owner name="${game.owner.name}" href="${playersUrl}${game.owner.id}" />
		<c:if test="${game.winner}">
		<winner name="${game.winner.name}" href="${playersUrl}${game.winner.id}" />
		</c:if>
		<buzzwords>
			<c:forEach var="buzzword" items="${game.buzzwords}">
			<buzzword>${buzzword}</buzzword>
			</c:forEach>	
		</buzzwords>
		<players>
			<c:forEach var="player" items="${game.players}">
			<player name="${player.name}" href="${playersUrl}${player.name}" />
			</c:forEach>
		</players>
		<boards>
			<c:forEach var="board" items="${game.boards}">
			<board href="${boardsUrl}${board.id}" />
			</c:forEach>
		</boards>
</game>